<?php


namespace App\Admin\Forms\Settings;

use App\Setting;
use Encore\Admin\Widgets\Form;
use Illuminate\Http\Request;

class ProjectSetting extends BaseForm
{
    public $title = '课题设置';
    protected $type = 'project';
    public $settings = [
        'project_promise_enabled' => '承诺书启用',
    ];

    public function form()
    {
        foreach ($this->settings as $slug => $label) {
            if ($slug == 'project_promise_enabled') {
                $this->radio($slug, $label)->options(['否', '是']);
            } else {
                $this->text($slug, $label);
            }
        }
        $this->disableReset();
    }

}
